import 'package:flutter_test/flutter_test.dart';
import 'package:component_face_detect/component_face_detect.dart';
import 'package:component_face_detect/component_face_detect_platform_interface.dart';
import 'package:component_face_detect/component_face_detect_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockComponentFaceDetectPlatform
    with MockPlatformInterfaceMixin
    implements ComponentFaceDetectPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final ComponentFaceDetectPlatform initialPlatform = ComponentFaceDetectPlatform.instance;

  test('$MethodChannelComponentFaceDetect is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelComponentFaceDetect>());
  });

  test('getPlatformVersion', () async {
    ComponentFaceDetect componentFaceDetectPlugin = ComponentFaceDetect();
    MockComponentFaceDetectPlatform fakePlatform = MockComponentFaceDetectPlatform();
    ComponentFaceDetectPlatform.instance = fakePlatform;

    expect(await componentFaceDetectPlugin.getPlatformVersion(), '42');
  });
}
